package org.jivesoftware.smack;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

public class RosterGroup
{
  private Connection connection;
  private final List<RosterEntry> entries;
  private String name;

  RosterGroup(String paramString, Connection paramConnection)
  {
    this.name = paramString;
    this.connection = paramConnection;
    this.entries = new ArrayList();
  }

  // ERROR //
  public void addEntry(RosterEntry paramRosterEntry)
    throws org.jivesoftware.smack.XMPPException
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore_2
    //   2: aload_0
    //   3: getfield 25	org/jivesoftware/smack/RosterGroup:entries	Ljava/util/List;
    //   6: astore_3
    //   7: aload_3
    //   8: monitorenter
    //   9: aload_0
    //   10: getfield 25	org/jivesoftware/smack/RosterGroup:entries	Ljava/util/List;
    //   13: aload_1
    //   14: invokeinterface 35 2 0
    //   19: ifne +71 -> 90
    //   22: new 37	org/jivesoftware/smack/packet/RosterPacket
    //   25: dup
    //   26: invokespecial 38	org/jivesoftware/smack/packet/RosterPacket:<init>	()V
    //   29: astore 5
    //   31: aload 5
    //   33: getstatic 44	org/jivesoftware/smack/packet/IQ$Type:SET	Lorg/jivesoftware/smack/packet/IQ$Type;
    //   36: invokevirtual 48	org/jivesoftware/smack/packet/RosterPacket:setType	(Lorg/jivesoftware/smack/packet/IQ$Type;)V
    //   39: aload_1
    //   40: invokestatic 54	org/jivesoftware/smack/RosterEntry:toRosterItem	(Lorg/jivesoftware/smack/RosterEntry;)Lorg/jivesoftware/smack/packet/RosterPacket$Item;
    //   43: astore 6
    //   45: aload 6
    //   47: aload_0
    //   48: invokevirtual 58	org/jivesoftware/smack/RosterGroup:getName	()Ljava/lang/String;
    //   51: invokevirtual 64	org/jivesoftware/smack/packet/RosterPacket$Item:addGroupName	(Ljava/lang/String;)V
    //   54: aload 5
    //   56: aload 6
    //   58: invokevirtual 68	org/jivesoftware/smack/packet/RosterPacket:addRosterItem	(Lorg/jivesoftware/smack/packet/RosterPacket$Item;)V
    //   61: aload_0
    //   62: getfield 20	org/jivesoftware/smack/RosterGroup:connection	Lorg/jivesoftware/smack/Connection;
    //   65: new 70	org/jivesoftware/smack/filter/PacketIDFilter
    //   68: dup
    //   69: aload 5
    //   71: invokevirtual 73	org/jivesoftware/smack/packet/RosterPacket:getPacketID	()Ljava/lang/String;
    //   74: invokespecial 75	org/jivesoftware/smack/filter/PacketIDFilter:<init>	(Ljava/lang/String;)V
    //   77: invokevirtual 81	org/jivesoftware/smack/Connection:createPacketCollector	(Lorg/jivesoftware/smack/filter/PacketFilter;)Lorg/jivesoftware/smack/PacketCollector;
    //   80: astore_2
    //   81: aload_0
    //   82: getfield 20	org/jivesoftware/smack/RosterGroup:connection	Lorg/jivesoftware/smack/Connection;
    //   85: aload 5
    //   87: invokevirtual 85	org/jivesoftware/smack/Connection:sendPacket	(Lorg/jivesoftware/smack/packet/Packet;)V
    //   90: aload_3
    //   91: monitorexit
    //   92: aload_2
    //   93: ifnull +66 -> 159
    //   96: aload_2
    //   97: invokestatic 91	org/jivesoftware/smack/SmackConfiguration:getPacketReplyTimeout	()I
    //   100: i2l
    //   101: invokevirtual 97	org/jivesoftware/smack/PacketCollector:nextResult	(J)Lorg/jivesoftware/smack/packet/Packet;
    //   104: checkcast 99	org/jivesoftware/smack/packet/IQ
    //   107: astore 7
    //   109: aload_2
    //   110: invokevirtual 102	org/jivesoftware/smack/PacketCollector:cancel	()V
    //   113: aload 7
    //   115: ifnonnull +20 -> 135
    //   118: new 29	org.jivesoftware.smack.XMPPException
    //   121: dup
    //   122: ldc 104
    //   124: invokespecial 105	org.jivesoftware.smack.XMPPException:<init>	(Ljava/lang/String;)V
    //   127: athrow
    //   128: astore 4
    //   130: aload_3
    //   131: monitorexit
    //   132: aload 4
    //   134: athrow
    //   135: aload 7
    //   137: invokevirtual 109	org/jivesoftware/smack/packet/IQ:getType	()Lorg/jivesoftware/smack/packet/IQ$Type;
    //   140: getstatic 112	org/jivesoftware/smack/packet/IQ$Type:ERROR	Lorg/jivesoftware/smack/packet/IQ$Type;
    //   143: if_acmpne +16 -> 159
    //   146: new 29	org.jivesoftware.smack.XMPPException
    //   149: dup
    //   150: aload 7
    //   152: invokevirtual 116	org/jivesoftware/smack/packet/IQ:getError	()Lorg/jivesoftware/smack/packet/XMPPError;
    //   155: invokespecial 119	org.jivesoftware.smack.XMPPException:<init>	(Lorg/jivesoftware/smack/packet/XMPPError;)V
    //   158: athrow
    //   159: return
    //
    // Exception table:
    //   from	to	target	type
    //   9	92	128	finally
    //   130	132	128	finally
  }

  public void addEntryLocal(RosterEntry paramRosterEntry)
  {
    synchronized (this.entries)
    {
      this.entries.remove(paramRosterEntry);
      this.entries.add(paramRosterEntry);
      return;
    }
  }

  public boolean contains(String paramString)
  {
    int i;
    if (getEntry(paramString) != null)
      i = 1;
    while (true)
    {
      return i;
      i = 0;
    }
  }

  public boolean contains(RosterEntry paramRosterEntry)
  {
    synchronized (this.entries)
    {
      boolean bool = this.entries.contains(paramRosterEntry);
      return bool;
    }
  }

  public Collection<RosterEntry> getEntries()
  {
    synchronized (this.entries)
    {
      List localList2 = Collections.unmodifiableList(new ArrayList(this.entries));
      return localList2;
    }
  }

  // ERROR //
  public RosterEntry getEntry(String paramString)
  {
    // Byte code:
    //   0: aload_1
    //   1: ifnonnull +9 -> 10
    //   4: aconst_null
    //   5: astore 7
    //   7: aload 7
    //   9: areturn
    //   10: aload_1
    //   11: invokestatic 149	org/jivesoftware/smack/util/StringUtils:parseBareAddress	(Ljava/lang/String;)Ljava/lang/String;
    //   14: invokevirtual 154	java/lang/String:toLowerCase	()Ljava/lang/String;
    //   17: astore_2
    //   18: aload_0
    //   19: getfield 25	org/jivesoftware/smack/RosterGroup:entries	Ljava/util/List;
    //   22: astore_3
    //   23: aload_3
    //   24: monitorenter
    //   25: aload_0
    //   26: getfield 25	org/jivesoftware/smack/RosterGroup:entries	Ljava/util/List;
    //   29: invokeinterface 158 1 0
    //   34: astore 5
    //   36: aload 5
    //   38: invokeinterface 164 1 0
    //   43: ifne +11 -> 54
    //   46: aload_3
    //   47: monitorexit
    //   48: aconst_null
    //   49: astore 7
    //   51: goto -44 -> 7
    //   54: aload 5
    //   56: invokeinterface 168 1 0
    //   61: checkcast 50	org/jivesoftware/smack/RosterEntry
    //   64: astore 6
    //   66: aload 6
    //   68: invokevirtual 171	org/jivesoftware/smack/RosterEntry:getUser	()Ljava/lang/String;
    //   71: aload_2
    //   72: invokevirtual 174	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   75: ifeq -39 -> 36
    //   78: aload_3
    //   79: monitorexit
    //   80: aload 6
    //   82: astore 7
    //   84: goto -77 -> 7
    //   87: astore 4
    //   89: aload_3
    //   90: monitorexit
    //   91: aload 4
    //   93: athrow
    //
    // Exception table:
    //   from	to	target	type
    //   25	91	87	finally
  }

  public int getEntryCount()
  {
    synchronized (this.entries)
    {
      int i = this.entries.size();
      return i;
    }
  }

  public String getName()
  {
    return this.name;
  }

  // ERROR //
  public void removeEntry(RosterEntry paramRosterEntry)
    throws org.jivesoftware.smack.XMPPException
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore_2
    //   2: aload_0
    //   3: getfield 25	org/jivesoftware/smack/RosterGroup:entries	Ljava/util/List;
    //   6: astore_3
    //   7: aload_3
    //   8: monitorenter
    //   9: aload_0
    //   10: getfield 25	org/jivesoftware/smack/RosterGroup:entries	Ljava/util/List;
    //   13: aload_1
    //   14: invokeinterface 35 2 0
    //   19: ifeq +71 -> 90
    //   22: new 37	org/jivesoftware/smack/packet/RosterPacket
    //   25: dup
    //   26: invokespecial 38	org/jivesoftware/smack/packet/RosterPacket:<init>	()V
    //   29: astore 5
    //   31: aload 5
    //   33: getstatic 44	org/jivesoftware/smack/packet/IQ$Type:SET	Lorg/jivesoftware/smack/packet/IQ$Type;
    //   36: invokevirtual 48	org/jivesoftware/smack/packet/RosterPacket:setType	(Lorg/jivesoftware/smack/packet/IQ$Type;)V
    //   39: aload_1
    //   40: invokestatic 54	org/jivesoftware/smack/RosterEntry:toRosterItem	(Lorg/jivesoftware/smack/RosterEntry;)Lorg/jivesoftware/smack/packet/RosterPacket$Item;
    //   43: astore 6
    //   45: aload 6
    //   47: aload_0
    //   48: invokevirtual 58	org/jivesoftware/smack/RosterGroup:getName	()Ljava/lang/String;
    //   51: invokevirtual 182	org/jivesoftware/smack/packet/RosterPacket$Item:removeGroupName	(Ljava/lang/String;)V
    //   54: aload 5
    //   56: aload 6
    //   58: invokevirtual 68	org/jivesoftware/smack/packet/RosterPacket:addRosterItem	(Lorg/jivesoftware/smack/packet/RosterPacket$Item;)V
    //   61: aload_0
    //   62: getfield 20	org/jivesoftware/smack/RosterGroup:connection	Lorg/jivesoftware/smack/Connection;
    //   65: new 70	org/jivesoftware/smack/filter/PacketIDFilter
    //   68: dup
    //   69: aload 5
    //   71: invokevirtual 73	org/jivesoftware/smack/packet/RosterPacket:getPacketID	()Ljava/lang/String;
    //   74: invokespecial 75	org/jivesoftware/smack/filter/PacketIDFilter:<init>	(Ljava/lang/String;)V
    //   77: invokevirtual 81	org/jivesoftware/smack/Connection:createPacketCollector	(Lorg/jivesoftware/smack/filter/PacketFilter;)Lorg/jivesoftware/smack/PacketCollector;
    //   80: astore_2
    //   81: aload_0
    //   82: getfield 20	org/jivesoftware/smack/RosterGroup:connection	Lorg/jivesoftware/smack/Connection;
    //   85: aload 5
    //   87: invokevirtual 85	org/jivesoftware/smack/Connection:sendPacket	(Lorg/jivesoftware/smack/packet/Packet;)V
    //   90: aload_3
    //   91: monitorexit
    //   92: aload_2
    //   93: ifnull +66 -> 159
    //   96: aload_2
    //   97: invokestatic 91	org/jivesoftware/smack/SmackConfiguration:getPacketReplyTimeout	()I
    //   100: i2l
    //   101: invokevirtual 97	org/jivesoftware/smack/PacketCollector:nextResult	(J)Lorg/jivesoftware/smack/packet/Packet;
    //   104: checkcast 99	org/jivesoftware/smack/packet/IQ
    //   107: astore 7
    //   109: aload_2
    //   110: invokevirtual 102	org/jivesoftware/smack/PacketCollector:cancel	()V
    //   113: aload 7
    //   115: ifnonnull +20 -> 135
    //   118: new 29	org.jivesoftware.smack.XMPPException
    //   121: dup
    //   122: ldc 104
    //   124: invokespecial 105	org.jivesoftware.smack.XMPPException:<init>	(Ljava/lang/String;)V
    //   127: athrow
    //   128: astore 4
    //   130: aload_3
    //   131: monitorexit
    //   132: aload 4
    //   134: athrow
    //   135: aload 7
    //   137: invokevirtual 109	org/jivesoftware/smack/packet/IQ:getType	()Lorg/jivesoftware/smack/packet/IQ$Type;
    //   140: getstatic 112	org/jivesoftware/smack/packet/IQ$Type:ERROR	Lorg/jivesoftware/smack/packet/IQ$Type;
    //   143: if_acmpne +16 -> 159
    //   146: new 29	org.jivesoftware.smack.XMPPException
    //   149: dup
    //   150: aload 7
    //   152: invokevirtual 116	org/jivesoftware/smack/packet/IQ:getError	()Lorg/jivesoftware/smack/packet/XMPPError;
    //   155: invokespecial 119	org.jivesoftware.smack.XMPPException:<init>	(Lorg/jivesoftware/smack/packet/XMPPError;)V
    //   158: athrow
    //   159: return
    //
    // Exception table:
    //   from	to	target	type
    //   9	92	128	finally
    //   130	132	128	finally
  }

  void removeEntryLocal(RosterEntry paramRosterEntry)
  {
    synchronized (this.entries)
    {
      if (this.entries.contains(paramRosterEntry))
        this.entries.remove(paramRosterEntry);
      return;
    }
  }

  // ERROR //
  public void setName(String paramString)
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 25	org/jivesoftware/smack/RosterGroup:entries	Ljava/util/List;
    //   4: astore_2
    //   5: aload_2
    //   6: monitorenter
    //   7: aload_0
    //   8: getfield 25	org/jivesoftware/smack/RosterGroup:entries	Ljava/util/List;
    //   11: invokeinterface 158 1 0
    //   16: astore 4
    //   18: aload 4
    //   20: invokeinterface 164 1 0
    //   25: ifne +6 -> 31
    //   28: aload_2
    //   29: monitorexit
    //   30: return
    //   31: aload 4
    //   33: invokeinterface 168 1 0
    //   38: checkcast 50	org/jivesoftware/smack/RosterEntry
    //   41: astore 5
    //   43: new 37	org/jivesoftware/smack/packet/RosterPacket
    //   46: dup
    //   47: invokespecial 38	org/jivesoftware/smack/packet/RosterPacket:<init>	()V
    //   50: astore 6
    //   52: aload 6
    //   54: getstatic 44	org/jivesoftware/smack/packet/IQ$Type:SET	Lorg/jivesoftware/smack/packet/IQ$Type;
    //   57: invokevirtual 48	org/jivesoftware/smack/packet/RosterPacket:setType	(Lorg/jivesoftware/smack/packet/IQ$Type;)V
    //   60: aload 5
    //   62: invokestatic 54	org/jivesoftware/smack/RosterEntry:toRosterItem	(Lorg/jivesoftware/smack/RosterEntry;)Lorg/jivesoftware/smack/packet/RosterPacket$Item;
    //   65: astore 7
    //   67: aload 7
    //   69: aload_0
    //   70: getfield 18	org/jivesoftware/smack/RosterGroup:name	Ljava/lang/String;
    //   73: invokevirtual 182	org/jivesoftware/smack/packet/RosterPacket$Item:removeGroupName	(Ljava/lang/String;)V
    //   76: aload 7
    //   78: aload_1
    //   79: invokevirtual 64	org/jivesoftware/smack/packet/RosterPacket$Item:addGroupName	(Ljava/lang/String;)V
    //   82: aload 6
    //   84: aload 7
    //   86: invokevirtual 68	org/jivesoftware/smack/packet/RosterPacket:addRosterItem	(Lorg/jivesoftware/smack/packet/RosterPacket$Item;)V
    //   89: aload_0
    //   90: getfield 20	org/jivesoftware/smack/RosterGroup:connection	Lorg/jivesoftware/smack/Connection;
    //   93: aload 6
    //   95: invokevirtual 85	org/jivesoftware/smack/Connection:sendPacket	(Lorg/jivesoftware/smack/packet/Packet;)V
    //   98: goto -80 -> 18
    //   101: astore_3
    //   102: aload_2
    //   103: monitorexit
    //   104: aload_3
    //   105: athrow
    //
    // Exception table:
    //   from	to	target	type
    //   7	104	101	finally
  }
}